#ifndef _TASK_H_
#define _TASK_H_

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include "task_sem.h"
#include <semaphore.h>



typedef struct task_struct {
pthread_t thread;
pthread_t wait;
struct task_struct * suivant;
sem_t actif;

} task_t;



int task_create(task_t * t, void * (* fonc) (void *), void * arg);
void * task_finish(void * arg);
void task_wait();
void task_cooperate();


#endif
